home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_pru_arrivalcs.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
6KB
|
239 lines
# Jones 3D Cog Script
#
# PRU_arrivalCS.cog CutScene of Indy arriving at level start.
#
# [GGJ]
#
# (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
#
# ========================================================================================
symbols
message startup
message user0
message entered
message activated
cog hint
cog watersounds
keyframe reflect=0in_figithat_4_4.key local
keyframe transition1=0in_stand1_bd_4.key local
keyframe transition2=0in_stand4_bd_1.key local
keyframe getOut=ij_getup.key local
material topMat=jeep_top.mat local
material botMat=jeep_bbmp.mat local
#template actortpl=indy_sh_actor local
template jeepActorTpl=jeep_actor_indy local
template emptyJeepTpl=jeepPRU local
template raftTpl=limpraft local
surface lastFace mask=0x004 #mask lets surface know to look for an actor
thing jeep
thing raft local
thing jeepActor local
thing emptyJeep local
thing actor
thing CScamera0 nolink
thing CSTarget0
thing CSTarget1
thing CSTarget2
#thing actorGhost
thing player local
thing tempCamSpot
thing templeBlock
thing fadePlate
sound peru=pu01j01.wav local # Ah, Peru. It's been a long time since I stood here...
sound jagSnd=fol_jg_call.wav local
sound CSMus=mus_jep_intro.wav local
sound jeepOffSnd=jep_engine_off.wav local
int tempCam local
int once=0 local
int bBusy=0 local
int newLine=-1 local
int oldLine0=-1 local
int oldLine1=-1 local
int oldLine2=-1 local
int bSeen=0 local
end
# ========================================================================================
code
startup:
SetMasterCog(GetSelfCog()); # RT: Set master cog so we get autosave/restore message
Sleep(0.001); # Let engine get set up
SetCameraFocus(2, CScamera0);
SetCameraSecondaryFocus(2, CSTarget0);
SetCameraLookInterp(2, 0);
SetCameraPosInterp(2, 0);
SetCurrentCamera(2);
SetCameraFOV(30, 0, 0.0);
return;
# ..............................................................................
user0: # RT: Indicates that autosave/restore has completed...
if (bSeen) return; # RT
bSeen = 1;
#camera stuff should be done before anything else
SetCameraFocus(2, CScamera0);
SetCameraSecondaryFocus(2, CSTarget0);
SetCameraLookInterp(2, 0);
SetCameraPosInterp(2, 0);
SetCurrentCamera(2);
SetCameraFOV(30, 0, 0.0);
StartCutscene(2);
# RT: Set up jeep materials
SetMaterialCel(topMat, 1);
SetMaterialCel(botMat, 1);
#sleep for 0.01 to generate a frame
Sleep(0.01);
#now proceed to other stuff...
player = GetLocalPlayerThing();
raft = CreateThingatPos(raftTpl, GetThingSector(jeep), VectorAdd(GetThingPos(jeep), '-0.005 -0.05 -0.005'), '0 0 0');
CaptureThing(raft);
AttachThingToThingEx(raft, jeep, 0x08);
# Turn off the player.
SetThingFlags(player, 0x80000);
SetActorFlags(player, 0x200000);
ThingFadeAnim(fadePlate, 1, 0, 2.0, 0);
Sleep(1.75);
SendMessage(watersounds, user5);
SetThingThrust(jeep, '0.0 2.0 0.0');
Sleep(2.0);
MoveToFrame(CSTarget0, 1, 0.66);
SetCameraFOV(50, 1, 3.0);
return;
# .................................................................................
entered:
Print("entered");
if (GetSenderRef() != lastFace) return;
if (once != 0) return;
once = 1;
PlaySoundLocal(CSMus, 1.0, 0.0, 0x0, 0);
StopThing(jeep);
Sleep(1.0);
jeepActor = CreateThing(jeepActortpl, jeep);
CaptureThing(jeepActor);
CopyPlayerHolsters(player, jeepActor);
CopyOrientandPos(Jeep, jeepActor);
#SetThingFlags(jeep, 0x80000);
ClearThingFlags(jeepActor, 0x80000);
AttachThingToThingEx(raft, jeepActor, 0x08);
DestroyThing(jeep);
PlaySoundThing(jeepOffSnd, jeepActor, 1.0, -1.0, -1.0, 0x0);
SendMessageEx(GetThingClassCog(jeepActor), user1, jeepActor, 0, 0, 0);
PlayKey(jeepActor, getOut, 4, 0x12, 1);
#make the "jeep with Indy" actor invisible
SetThingFlags(jeepActor, 0x80000);
#create a seperate jeep thing and Indy actor
emptyJeep = CreateThing(emptyJeepTpl, jeepActor);
CaptureThing(emptyJeep);
CopyOrientandPos(jeepActor, emptyJeep);
#actor = CreateThing(actorTpl, actorGhost);
#CaptureThing(actor);
CopyPlayerHolsters(player, actor);
ClearThingFlags(actor, 0x80000);
AttachThingToThingEx(raft, emptyJeep, 0x08);
#walk the actor over toward the temple
SetCameraLookInterp(2, 1);
SetCameraInterpSpeed(2, 2.6);
Sleep(0.01);
SetCameraSecondaryFocus(2, CSTarget1);
SetCameraFOV(90, 1, 1.5);
AISetLookThing(actor, templeBlock);
AISetMoveSpeed(actor, 1.0);
AISetMoveThing(actor, CSTarget2, 1);
PlayVoice(actor, peru, 1, 0);
PlayKey(actor, transition1, 4, 0x12, 1);
PlayKey(actor, reflect, 4, 0x12, 1);
PlayKey(actor, transition2, 4, 0x12, 0);
Sleep(0.5);
PlaySoundLocal(jagSnd, 1.0, 0.2, 0x880, 0);
SendMessage(watersounds, user6);
Sleep(2.0);
CopyOrientandPos(actor, player);
SetThingFlags(actor, 0x80000);
ClearThingFlags(player, 0x80000);
ClearActorFlags(player, 0x200000);
EndCutscene();
SetCameraLookInterp(2, 0);
SetCameraPosInterp(2, 0);
ResetCameraFOV(0, 0.0);
tempCam = GetThingPos(tempCamSpot);
SetCameraPosition(1, tempCam);
SetCurrentCamera(1);
#SendMessage(watersounds, user5);
return;
# .................................................................................
activated:
if (GetSenderRef() == raft)
{
# Add Repair Kit if Indy doesn't have one
ChangeInv(player, 56, 1.0);
SetInvAvailable(player, 56, 1);
SetInvDisabled(player, 56, 1);
SetExtCamLookOffset('0.0 0.04 0.014');
SetExtCamOffset('0.1 0.01 0.12');
Sleep(1.5);
RestoreExtCam();
SendMessage(hint, user1);
}
return;
end
# .................................................................................